import { withRouter } from 'next/router'; // 1.

const My = ({ router }) => {
  // 3.
  return (
    <div className="test">
      这里是a
      {/* // 4. */}
      <img src="/static/promise.jpg" />
      <p>{router.query.id}</p>
    </div>
  );
};

export default withRouter(My); //2.
